package com.mchat.ratelimit.strategy;

import com.mchat.ratelimit.dto.BaseDTO;
import jakarta.annotation.PostConstruct;
import reactor.core.publisher.Mono;

public abstract class AbstractRateLimitStrategy {
    @PostConstruct
    protected  void register(){
        StrategyFactory.register(getStrategyName(),this);
    }
    public abstract <T extends BaseDTO> Mono<Boolean> reachRateLimit(T dto);

    protected abstract String getStrategyName();
}
